using System;
using System.Globalization;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using System.Xml;
using System.Reflection;
using Services;
using Utilities.Menu.UIElements;
using BowMaster.Resources;
using BowMaster.SceneElements;

namespace BowMaster.Levels
{
    class BaloonsTargetTutorial : BaloonsTargetBase
    {
        public BaloonsTargetTutorial(Game game, int index)
            : base(game, index, Strings.Tutorial_Balloons, 1)
        {

        }

        protected override void LoadContent()
        {
            
            level_height = 600;
            level_width = 800;
            base.LoadContent();
            shoots = 5;

            baloons.Add(new BaloonTarget(texture, Color.Red, new Vector2(500, 200), new Vector2(-25, 0)));
            baloons.Add(new BaloonTarget(texture, Color.Yellow, new Vector2(600, 300), new Vector2(-15, 0)));
            wind_level = 0;
            wind_level_b.text = "0";
            wind_level_b.UpdateTextPos();
        }
        public override void Update(GameTime gameTime)
        {
            shoots = 5;
            base.Update(gameTime);
        }
    }

    class BaloonsTargetLevel01 : BaloonsTargetBase
    {
        public BaloonsTargetLevel01(Game game, int index)
            : base(game, index, Strings.L000_Title, 2)
        { }

        protected override void LoadContent()
        {
                   
            level_height = 600;
            level_width = 1000;
            base.LoadContent();     
            shoots = 5;
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
        }

    }

    class BaloonsTargetLevel02 : BaloonsTargetBase
    {
        public BaloonsTargetLevel02(Game game, int index)
            : base(game, index, Strings.L000_Title, 5)
        { }

        protected override void LoadContent()
        {

            level_height = 600;
            level_width = 1000;
            base.LoadContent();
            shoots = 7;
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
        }

    }

    class BaloonsTargetLevel03 : BaloonsTargetBase
    {
        public BaloonsTargetLevel03(Game game, int index)
            : base(game, index, Strings.L000_Title, 5)
        { }

        protected override void LoadContent()
        {

            level_height = 600;
            level_width = 1000;
            base.LoadContent();
            shoots = 7;
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
            AddBalloon();
        }

    }

    class BaloonsTargetRandom : BaloonsTargetBase
    {
        public BaloonsTargetRandom(Game game)
            : base(game, -1, Strings.BalloonsRandom, 0)
        { }

        protected override void LoadContent()
        {
            rnd = new Random();
            
            level_height = rnd.Next(600,900);
            level_width = rnd.Next(800,1600);

            base.LoadContent();
            int j = rnd.Next(5, 10);
            objective = j - 1;
            shoots = j;
            for (int i = 0; i < j; i++)
                AddBalloon();

            //int obstacle = rnd.Next(1000) % (level_width/400);
            //for (int i = 0; i < obstacle; i++)
            //{
            //    int x = rnd.Next(
            //    if (rnd.Next(1000) % 2) ;
            //}
        }

    }
}
